package com.jcgyl.export.service.Impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jcgyl.export.dao.TbpayinfoDao;
import com.jcgyl.export.dao.TbreceiptDao;
import com.jcgyl.export.entity.Tbpayinfo;
import com.jcgyl.export.entity.Tbreceipt;
import com.jcgyl.export.service.PayInfoService;
/**
 * 
 * @author JL
 * 支付单实现
 *
 */
@Service
public class PayInfoServiceImpl implements PayInfoService {

	@Autowired
	private TbpayinfoDao tbpayinfoDao;
	@Autowired
	private TbreceiptDao tbreceiptDao;


	/*
	 * (non-Javadoc)
	 * @see com.jcgyl.export.service.PayInfoService#findObject(java.lang.String, java.lang.String,
	 *  java.lang.String, java.lang.String, int, int)
	 *  按条件查询数据
	 *  JL
	 */
	@Override
	public List<Map<String, Object>> findObject(String guid, String orderid, String Starttime, String Endtime,
			int pageSize, int pageCount) {
		int startIndex = (pageCount - 1) * pageSize;
		return tbpayinfoDao.findObject(guid, orderid, Starttime, Endtime,startIndex, pageSize);
	}
	/*
	 * (non-Javadoc)
	 * @see com.jcgyl.export.service.PayInfoService#getRowCount(java.lang.String, 
	 * java.lang.String, java.lang.String, java.lang.String)
	 * 按条件查询总条数
	 * JL
	 */
	@Override
	public Integer getRowCount(String guid, String orderid, String Starttime, String Endtime) {
		return tbpayinfoDao.getRowCount(guid, orderid, Starttime, Endtime);
	}
	@Override
	public void batchInsert(List<Tbpayinfo> payinfos) {
		// TODO Auto-generated method stub
		tbpayinfoDao.batchInsert(payinfos);
	}

	@Override
	public Integer UpdataObject(Tbpayinfo tbpayinfo) {
		return tbpayinfoDao.updateObject(tbpayinfo);
	}

	/*
	 * (non-Javadoc)
	 * @see com.jcgyl.export.service.PayInfoService#findReceipt(java.lang.String, java.lang.String)
	 * 支付订单回执查询
	 * JL
	 */
	@Override
	public List<Tbreceipt> findReceipt(String receipttype, String expressnumber) {
		return tbreceiptDao.findObject(receipttype, expressnumber);
	}






}
